using NUnit.Framework;

namespace ComponentTracer.Tests
{
    [TestFixture]
    public class MethodWithOutParameterTests
    {
        [Test]
        public void Method_with_out_Parameter_will_be_traced() {
            var trace = "";
            var proxy = TracerProxy.Create(new MyOutClass(), s => trace += s);

            string result;
            proxy.Result(out result);

            Assert.That(trace, Is.EqualTo("ComponentTracer.Tests.MyOutClass.Result(null\r\n)\n"));
        }
    }

    public class MyOutClass
    {
        public virtual void Result(out string result) {
            result = "x";
        }
    }
}